﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using sexhealth.console.service.post.vo;
using System.Collections;
using sexhealth.console.service.post;
using System.Text;
public partial class mediadetail : System.Web.UI.Page
{
    PostService postService = new PostService();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {


            if (Request["pid"] != null)
            {
                PostVO post = postService.DaoGetVOById<PostVO>(int.Parse(Request["pid"]));
                ltlPostTitle.Text = post.Title;
                if (post.BelongToChannelId == 14)
                {
                    ltlPostContent.Text = "<a class='media {width:439, height:329}' href='upload/media/" + post.FileLink + "'> </a>";
                }
                else if (post.BelongToChannelId == 15)
                {
                    ltlPostContent.Text = "<audio src='upload/media/" + post.FileLink + "' controls>";
                }

                ChannelVO belongToChannel = postService.DaoGetVOById<ChannelVO>(post.BelongToChannelId);
                ltlSubChannelName.Text = belongToChannel.Name;
                ltlLocationName.Text = belongToChannel.Name;
            }
        }
    }
}
